package com.shg.web.tools;

import java.util.Timer;
import java.util.TimerTask;

import com.shg.web.mail.action.MailInterface;

public class TimerTool extends TimerTask {

	private MailInterface wordAction;
	private Timer time;
	
	public TimerTool(MailInterface wordAction){
		this.wordAction=wordAction;
		time=new Timer();
		//2分钟后删除
		time.schedule(this, 1000*120,1);
	}
	@Override
	public void run() {
		wordAction.updateValidate(0);
		time.cancel();
		this.cancel();
	}

}
